# -*- coding: utf-8 -*-
# vim: ft=jinja

{#- Start imports as #}
{%- import_yaml 'redis/defaults.yaml' as default_settings %}
{%- import_yaml 'redis/osfamilymap.yaml' as osfamilymap %}
{%- import_yaml 'redis/osfingermap.yaml' as osfingermap %}

{%- set defaults = salt['grains.filter_by'](default_settings,
    default='redis',
    merge=salt['grains.filter_by'](osfamilymap, grain='os_family',
      merge=salt['grains.filter_by'](osfingermap, grain='osfinger',
          merge=salt['pillar.get']('redis:lookup', default={})
      )
    )
) %}

{#- Merge the redis pillar #}
{%- set redis_settings = salt['pillar.get']('redis', default=defaults, merge=True) %}
